package com.qianli.cashmama.trade.common.enums;

/**
 * Created with IntelliJ IDEA.
 * User: pavan
 * Date: 2019/12/12
 * Time: 下午5:05
 */
public enum TradeAuditSubStatusEnum {
    INIT(0, "初始化"),
    AUDIT_SUCCESS(1, "成功"),
    AUDIT_FAILED(2, "失败"),
    WAITING_HIGHMARK(3, "waiting highmark");

    private int status;
    private String desc;

    TradeAuditSubStatusEnum(int status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public int getStatus() {
        return status;
    }

    public TradeAuditSubStatusEnum setStatus(int status) {
        this.status = status;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public TradeAuditSubStatusEnum setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public static TradeAuditSubStatusEnum getEnum(int status) {
        TradeAuditSubStatusEnum tradeAuditSubStatusEnum = null;
        for (TradeAuditSubStatusEnum e : TradeAuditSubStatusEnum.values()) {
            if (e.getStatus() == status) {
                tradeAuditSubStatusEnum = e;
                break;
            }
        }
        return tradeAuditSubStatusEnum;
    }
}
